<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}
</style>







</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
            <input type="hidden" name="sqid" id="sqid"  value="${data.sqid}"/>
            <input type="hidden" name="states" id="states" value="${data.states}"/>
            <input type="hidden" name="bjid" id="bjid"  value="${data.bjid}"/>
            <input type="hidden" name="stuid" id="stuid"  value="${data.stuid}"/>
		   	<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
			<tr>
				<td class="table-header" colspan="6">助学金申请</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 12%">姓名：</td>
				<td class="table-contentTD" style="width: 21%">${data.xm}</td>
				<td class="table-titleTD"  style="width: 12%">学号：</td>
				<td class="table-contentTD" style="width: 21%">${data.xh}</td>
				<td class="table-titleTD" style="width: 12%">性别：</td>
				<td class="table-contentTD" style="width: 22%">${data.xb}</td>
			</tr>
			<tr>
				<td class="table-titleTD">班级：</td>
				<td class="table-contentTD">${data.bjmc}</td>
				<td class="table-titleTD">专业：</td>
				<td class="table-contentTD">${data.zymc}</td>
				<td class="table-titleTD">年级：</td>
				<td class="table-contentTD">${data.njmc}</td>
			</tr>
			
			<tr>
				<td class="table-titleTD"><font style="color: red;">*</font>民族：</td>
				<td class="table-contentTD"><select id="mz" name="mz"   class="selectList required">
						<option value="">请选择</option>
							 <c:forEach items="${nationList}" var="code">
								<option value="${code.codename}">${code.codename}</option>
							</c:forEach>
				</select></td>
				<td class="table-titleTD">出生日期：</td>
				<td class="table-contentTD">${data.csrq1}</td>
				<td class="table-titleTD">入学日期：</td>
				<td class="table-contentTD"><fmt:formatDate value="${data.rxrq}" pattern="yyyy-MM-dd"/> </td>
			</tr>
			
			<%-- <tr>
			  <td class="table-titleTD" colspan="6" style="text-align: left;">家庭成员情况：</td>
			</tr>
					<tr>
						<td class="table-titleTD" colspan="2" style='text-align: center;'>姓名</td>
						<td class="table-titleTD"  style='text-align: center;'>年龄</td>
						<td class="table-titleTD" colspan="2" style='text-align: center;'>与本人关系</td>
					    <td class="table-titleTD" style='text-align: center;'>工作或学习单位</td>
					</tr>
					
				   <c:choose>
						<c:when test="${not empty familyList}"> 
						    	<c:forEach items="${familyList}" var="family">
							      <tr>
										<td class="table-contentTD"  colspan="2"style='text-align: center;'>${family.xm}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.age}</td>
										<td class="table-contentTD" colspan="2"  style='text-align: center;'>${family.gx}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.gzdw}</td>
								   <tr>
									
							 </c:forEach>
						</c:when>
							<c:otherwise>  
                               <tr>
							        <td class="table-titleTD" colspan="6" style="text-align: center;">无家庭成员信息</td>
							    </tr>	
							</c:otherwise> 
					</c:choose>  --%>
				  <tr>
				<td class="table-titleTD">家庭成员：</td>
				<td colspan="5">
				   <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="100%">
					  <tr>
						<td class="table-titleTD"  style='text-align: center;'>姓名</td>
						<td class="table-titleTD"  style='text-align: center;'>年龄</td>
						<td class="table-titleTD"  style='text-align: center;'>与本人关系</td>
					    <td class="table-titleTD"  colspan="2"  style='text-align: center;'>工作或学习单位</td>
					   </tr>
					   
					     <c:choose>
						<c:when test="${not empty familyList}"> 
						    	<c:forEach items="${familyList}" var="family">
							      <tr>
										<td class="table-contentTD" style='text-align: center;'>${family.xm}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.age}</td>
										<td class="table-contentTD"  style='text-align: center;'>${family.gx}</td>
										<td class="table-contentTD"  colspan="2" style='text-align: center;'>${family.gzdw}</td>
								   <tr>
									
							 </c:forEach>
						</c:when>
							<c:otherwise>  
                               <tr>
							        <td class="table-titleTD" colspan="5" style="text-align: center;">无家庭成员信息</td>
							    </tr>	
							</c:otherwise> 
					    </c:choose> 
			       </table>
				</td>
			</tr>	
			
			  <tr>
					<td class="table-titleTD"><font style="color: red;">*</font>户籍性质：</td>
					<td class="table-contentTD"> 
						  <input type="radio" value="农业户口"  name="hjxz"  <c:if test="${data.hjxz=='农业户口'}">checked="checked"</c:if>/>农业户口
						  <input type="radio" value="非农业户口" name="hjxz" <c:if test="${data.hjxz=='非农业户口'}">checked="checked"</c:if>/>非农业户口
			    </td>
				<td class="table-titleTD"><font style="color: red;">*</font>主要收入来源:</td>
				<td class="table-contentTD">
				<input type="text" name="zysrly" id="zysrly" placeholder="主要收入来源"  value="${data.zysrly}" class="inputText required"   autocomplete="off"/>
				</td>
				<td class="table-titleTD"><font style="color: red;">*</font>联系电话:</td>
				<td class="table-contentTD">	
				<input type="text" name="lxdh" id="lxdh" placeholder="联系电话"    value="${data.lxdh}"  class="inputText required"  autocomplete="off"/> 
				</td>
			 </tr>
			 
			  <tr>
				<td class="table-titleTD"><font style="color: red;">*</font>家庭年收入:</td>
				<td class="table-contentTD">
				<input type="text" name="jtnsr" id="jtnsr" placeholder="家庭年收入"  value="${data.jtnsr}"  class="inputText required"  maxlength="40" autocomplete="off"/>
				</td>
				<td class="table-titleTD"><font style="color: red;">*</font>人均年收入:</td>
				<td class="table-contentTD">	
				<input type="text" name="rjnsr" id="rjnsr" placeholder="人均年收入"   value="${data.rjnsr}"   class="inputText required"  maxlength="40" autocomplete="off"/> 
				</td>
				  <td class="table-titleTD"><font style="color: red;">*</font>是否因病因灾:</td>
				  <td class="table-contentTD">	
				     <input type="radio" value="true" name="sfybyz" <c:if test="${data.sfybyz=='true'}">checked="checked"</c:if> />是
				     <input type="radio" value="false" name="sfybyz" <c:if test="${data.sfybyz=='false'}">checked="checked"</c:if>/>否
				  </td>
			 </tr>
			 
			   <tr>
				<td class="table-titleTD"><font style="color: red;">*</font>家庭地址:</td>
				<td class="table-contentTD" colspan="3">
			    	<input type="text" name="jtdz" id="jtdz" placeholder="家庭地址" value="${data.jtdz}" style="width: 98%" class="inputText required"  maxlength="40"  autocomplete="off"/>
				</td>
				<td class="table-titleTD"><font style="color: red;">*</font>邮政编码:</td>
				<td class="table-contentTD">	
				<input type="text" name="yzbm" id="yzbm" placeholder="邮政编码" value="${data.yzbm}"  maxlength="40" class="inputText required"  autocomplete="off"/> 
				</td>
			 </tr>
			<tr>
				<td class="table-titleTD"><font style="color: red;">*</font>申请助学金理由:</td>
				<td class="table-contentTD" colspan="6" style="width: 100%"><textarea style="width: 90%;height: 80px;" name="sqly"  autocomplete="off" class="required" placeholder="申请助学金理由" id="sqly" maxlength="500" >${data.sqly}</textarea></td>
			</tr>
		</table>
	 </form>
     <br />
		
		    
		<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			    <td><input type="button" id="btnSave" class="inputButton" style="text-align: center;" value="保存"  autocomplete="off"/></td>
				<td><input type="button" id="Cancel" class="inputButton" style="text-align: center;" value="取消"  autocomplete="off"/></td>
				<td><input type="button" id="returnBut" class="inputButton" value="返回" style="text-align: center;" autocomplete="off"/></td>
			</tr>
		</table>
		
		<script>
		
			$(document).ready(function() {
				var _form=$("#Form").validate();
				$("#btnSave").click(function() {
						if(_form.form()){
							  validateObj();
						}
				});
				
				function validateObj(){
						    document.Form.action ="${basePath}/zxjStudentNationalGrant/update";
							document.Form.submit();
				}
				
				
				
				$("#Cancel").click(function() {
					   window.location.href ="${basePath}/zxjStudentNationalGrant/details?id="+ $("#sqid").val();
		 		});
				
				$("#returnBut").click(function() {
		 			 window.location.href='${basePath}/zxjStudentNationalGrant/index';
		 		});
			});
		       compareListValue(document.getElementById('mz'),'${data.mz}');
		</script>
</body>
</html>
